package com.aw.baselib.base;

import com.google.gson.Gson;

import okhttp3.MediaType;
import okhttp3.RequestBody;

/**
 * @author : hzw
 * @date : 2020/3/20
 */
public class AwBaseRequest {

    protected static RequestBody getBody(Object object) {
        return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(object));
    }

    protected static RequestBody getBodyText(String object) {
        return RequestBody.create(MediaType.parse("text/plain"), object);
    }
}
